<!--
 * @Author: 马潭龙
 * @Date: 2022-01-18 09:55:21
 * @LastEditTime: 2022-01-18 15:54:13
 * @LastEditors: 马潭龙
 * @Description: 知识管理
 * @FilePath: \devlomp\icm-vue-master\src\views\hifar\knowledge\knowledgelist.vue
 * 可以输入预定的版权声明、个性签名、空行等
-->
<template>
  <div class="h-custom-layout">
    <r-l-layout style="height: 100%" :leftMinWidth="250" class="h-custom-layout">
    <div slot="left" style="height: 100%">
      
      <knowledgeLeft v-model="treecode" @getDataByKey="getDataByKey" @tree="getTree" ref="left" />
    </div>
    <div slot="right" style="height: 100%">
      <knowledgeRight v-model="treecode" :tree="treeData" ref="right" />
    </div>
  </r-l-layout>
  </div>
</template>

<script>
import knowledgeLeft from './knowledgeLeft.vue'
import knowledgeRight from './knowledgeRight.vue'
export default {
  name: 'HfPmProjectToolsMain',
  components: { 
    knowledgeRight,
   knowledgeLeft 
   },
  data() {
    return {
      description: '项目工具',
      treecode: '',
      selectedKey: [],
      treeData: [],
    }
  },
  methods: {
    getDataByKey(key) {
      this.selectedKey = key
      this.$refs.right.loadData(key)
    },
    //左树选中id置空
    claerSelect() {
      this.$refs.left.claerSelect()
    },
    // 树的数据
    getTree(treeData) {
      this.treeData = treeData
    },
  },
}
</script>

<style lang="less" scoped>
.h-custom-layout {
  height: 100%;
  .actions-icon {
    cursor: pointer;
  }
}
</style>